CREATE EXTERNAL TABLE jms_dwd.dwd_terminal_send_dt_back(
  `billcode` string COMMENT '运单号',
  `end_center_send_time` timestamp COMMENT '末端中心发件时间',
  `end_center_code` string COMMENT '末端中心编码',
  `center_scan_user_code` string COMMENT '新增中心扫描员',
  `send_next_station_code` string COMMENT '下一站网点')
COMMENT '末端发件中间表(新版逻辑)'
PARTITIONED BY (
  `dt` string COMMENT '时间分区')
ROW FORMAT SERDE
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  'hdfs://yl-bg-hdp/dw/hive/jms_dwd.db/external/dwd_terminal_send_dt_back';


CREATE EXTERNAL TABLE jms_dwd.dwd_terminal_aging_sign_tmp_back(
  `billcode` string COMMENT '运单号',
  `is_aging_repeatedly` tinyint COMMENT '是否多次时效 1 是 2 否',
  `fst_aging_sign_time` timestamp COMMENT '最早时效签收时间',
  `fst_aging_sign_network_code` string COMMENT '最早时效签收网点',
  `fst_aging_sign_scan_type` string COMMENT '最早时效签收类型',
  `fst_aging_sign_user_code` string COMMENT '最早时效签收扫描员',
  `fst_aging_sign_pistolid` string COMMENT '巴枪id PDD开头是桃花岛其他是自助对接',
  `fst_sign_time` timestamp COMMENT '最早签收时间',
  `fst_sign_network_code` string COMMENT '最早签收网点',
  `fst_sign_user_code` string COMMENT '最早签收扫描员',
  `fst_sign_source` string COMMENT '最早签收来源',
  actual_sign_time timestamp comment '实际签收时间',
  actual_sign_network_code string comment '实际签收网点',
  actual_sign_scan_type string comment '实际签收类型',
  actual_sign_user_code string comment '实际签收扫描员'
  )
COMMENT '末端时效签收中间表'
ROW FORMAT SERDE
  'org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe'
STORED AS INPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat'
OUTPUTFORMAT
  'org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat'
LOCATION
  'hdfs://yl-bg-hdp/dw/hive/jms_dwd.db/external/dwd_terminal_aging_sign_tmp_back'